// SPDX-License-Identifier: GPL-2.0-or-later

#ifndef _SNAKE_FIELD_RECT_SHAPE_FIELD_HPP_
#define _SNAKE_FIELD_RECT_SHAPE_FIELD_HPP_

#include <cstdint>
#include <string>

#include <Snake/Field/AField.hpp>

#include <Snake/Position.hpp>
#include <Snake/Field/Tile.hpp>

#include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/RectangleShape.hpp>

class RectShapeField : public AField
{
	private:
		sf::RectangleShape** cells;

		virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;

	public:
		RectShapeField(uint8_t size, const sf::FloatRect& rect);
		~RectShapeField();

		virtual void setTile(const Position& position, const Tile& tile) override;

		void loadTileset(const std::string& filename);
};

#endif
